package webServices;

import javax.jws.*;
import javax.jws.soap.*;

@WebService(targetNamespace = "http://www.test.com/", serviceName = "Test")
@SOAPBinding(style = SOAPBinding.Style.RPC)  
@HandlerChain(file = "../../META-INF/jaxws-handlers-server.xml")
public class Test {
	
	@WebMethod
	@WebResult(name="result")
	public int addition(@WebParam(name="number1") int number1, 
			 @WebParam(name="number2") int number2){
		try {
			Thread.sleep(number1*1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		int result=number1+number2;
		//System.out.println("addition("+number1+","+number2+") --> "+result);
		//  System.out.flush();
		return result;
	}
	
	@WebMethod
	@WebResult(name="result")
	public int prova(){
		return 1;
	}
}
